package com.xuan.mapper;

import com.xuan.entity.po.UserRoles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xuan
 * @since 2025-06-12
 */
@Mapper
public interface UserRolesMapper extends BaseMapper<UserRoles> {

    @Select("SELECT user_id FROM user_roles WHERE role_id = #{roleId}")
    List<Long> selectByRoleId(Integer roleId);

    @Select("SELECT * FROM user_roles")
    List<UserRoles> selectAllUser();
}
